package com.zengqingfa.dubbo.mall;

import com.zengqingfa.dubbo.mall.entity.UserAddress;
import com.zengqingfa.dubbo.mall.service.OrderServiceXml;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;
import java.util.List;

/**
 *
 * @fileName: OrderXmlApp
 * @author: zengqf3
 * @date: 2021-4-12 15:17
 * @description:
 */
public class OrderXmlApp {

    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:dubbo-consumer.xml");
        OrderServiceXml orderService = context.getBean(OrderServiceXml.class);
        for (int i = 0; i <10 ; i++) {
            List<UserAddress> userAddressList = orderService.initOrder("111");
            // userAddressList.forEach(u -> {
            //     System.out.println(u);
            // });
            System.out.println(userAddressList);
        }
        System.in.read();
    }
}
